package com.budwk.app.sys.services;

import com.budwk.app.sys.models.LinuxPackageLay;
import com.budwk.app.sys.vo.LinuxPackageLayVo;
import com.budwk.starter.common.result.Result;
import com.budwk.starter.database.service.BaseService;
import org.nutz.mvc.upload.TempFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.time.LocalDate;

public interface LinuxPackageLayService extends BaseService<LinuxPackageLay>{

    // 上传文件到linux服务器
    Result<?> uploadFileToLinux(TempFile file, String configId);

    Result<?> listByPage(LinuxPackageLayVo layVo);

    Result<?> pushPackage(String layId, String configId) throws InterruptedException;

    void queryLog(String layId, HttpServletResponse response) throws IOException;

    Result<?> listHistroyLog(String configId, LocalDate queryTime);

    void downloadHistroyLog(String configId, String logName, HttpServletResponse response);

    Result<?> afreshUploadFile(String layId);
}
